package com.hebeiboruan.common.uitl;

import java.util.regex.Pattern;

/**
 * 正则验证工具类
 *
 * @author 刘焕林
 * @date 2024/01/13
 */
public class CheckUtil {
    public static Boolean phone(String phone){
      return   Pattern.matches("^(13[0-9]|14[5-9]|15[0-35-9]|16[25-7]|17[0-8]|18[0-9]|19[0135689])[0-9]{8}$",phone);
    }
    public static Boolean email(String email){
        return Pattern.matches("^[a-zA-Z_]{1,}[0-9]{0,}@(([a-zA-z0-9]-*){1,}\\.){1,3}[a-zA-z\\-]{1,}$ ",email);
    }
}
